home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18409 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: minerva.ibernet.es!usenet
  2. From: greg_grifolls@redestb.es (Gregori Grifolls)
  3. Newsgroups: comp.lang.c++
  4. Subject: Would you like do that ???????????
  5. Date: Sat, 20 Apr 1996 09:46:08 GMT
  6. Organization: Servicio IBERNET (Telefonica Transmision de Datos)
  7. Message-ID: <4lafch$6f9@minerva.ibernet.es>
  8. NNTP-Posting-Host: 194.224.154.173
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11.  
  12.     Hi!!
  13.         I have to implementate a program that calculates the value of a
  14. arithmrtic parenthesis expression. You can use 'A'..'Z' as a
  15. openrands, '(',')' as a parenthesis and '+','-','*',/' as a perators. 
  16.  
  17.     The program ask you for the charecters of the expression, for exemple
  18. ((((A+B)*B)/D)-(E*B))/A. it will be stored as a queu(character).
  19.  
  20.     Then the program ask you for the numeric value of the each char.
  21. During this process the program must check if the char is right, and
  22. at the end must check if the parenthesis are right( same number of
  23. parenthesis opened and closed).
  24.  
  25.     Then the expression have to be changed th a postfix and stored in a
  26. pheap(charecter). exemple ('AB+C*D/EB*-A/').
  27.  
  28.     So that it is necessary use a TAD heap(character) and TAD
  29. queu(character) in the program, who use too a ask_for_information and
  30. postfix.
  31.  
  32.     Thx!! for your ideas!!!!!!!!!!!!
  33.  
  34.